using System.Reflection;
using System.Resources;
using FireStarter.CodeGeneration.Parser;

namespace FireStarterModeller.Logic
{
    public class ResourceTemplateLoader : ITemplateLoader
    {
        private ResourceManager _resourceManager;

        public ResourceTemplateLoader(Assembly assembly, string resourceName)
        {
            _resourceManager = new ResourceManager(resourceName, assembly);
        }


        public string GetTemplateText(string templateName)
        {
            return _resourceManager.GetString(templateName);
        }
    }
}